package com.niiwoo.activity.stage.enums.invite;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * tjb
 */
@AllArgsConstructor
@Getter
public enum InviteLoanFlowLinkTypeEnum {

    REPAY_SUCCESS_WITHOUT_UP((byte) 1, "还款成功-未获得提额、未获得优惠页面"),
    BORROW_SUCCESS((byte) 2, "借款申请成功"),
    BORROW_IN_AUDIT((byte) 3, "我的借款-进行中"),
    BORROW_PROJECT_IN_AUDIT((byte) 4, "我要借款-有借款标在审核中"),
    BORROW_FAIL((byte) 5, "我要借款-借款资质不符合要求"),
    ME_BORROW((byte) 6, "我-借款"),
    REPAY_SUCCESS((byte) 7, "还款成功");

    private Byte code;
    private String desc;

    public static InviteLoanFlowLinkTypeEnum valueOf(Byte code) {
        for (InviteLoanFlowLinkTypeEnum yesOrNoEnum : InviteLoanFlowLinkTypeEnum.values()) {
            if (code.byteValue() == yesOrNoEnum.getCode()) {
                return yesOrNoEnum;
            }
        }
        return null;
    }
}

